/**
 * Created by Administrator on 2017/9/15 0015.
 */
$(function () {
   $(document).on('click', '.push-order', function () {
       var _this = $(this);
       $.confirm('订单推送后将不可修改，请确认！！', function () {
           $.showLoading();
           $.ajax({
               type : 'POST',
               url : '/index/shop/push_order',
               data : {
                   id : _this.data('order-id'),
                   shop_id : _this.data('shop-id'),
               },
               dataType : 'json',
               success : function (msg) {
                   $.hideLoading();
                   console.log(msg);
                   if (msg.code == 200) {
                       $.toptip('推送成功！', 'success');
                       window.location.reload();
                   } else {
                       $.toptip(msg.msg);
                   }
               }
           });
       });

   }); 
});